﻿using UnityEngine;
using System.Collections;

namespace Room
{
    public class RCAIUnionActorStand : RCAIUnionActorBase
    {
        protected override void OnEnter()
        {
            if (controller.owner.name == StaticData.playerData.playerId.ToString())
            {
                EasyTouchTool.Instance.ShowJoystick();
            }

            prePos = controller.owner.transform.position;
        }

        Vector3 prePos;

        protected override void OnTick()
        {
            if (controller.owner.IsMoving()
                || prePos != controller.owner.transform.position)
            {
                controller.SwitchState((int)UnionActorState.Move);
            }
            else
            {
                controller.owner.PlayAnim(AniName.STAND);
            }
        }

    }
}